/**************************
 * \if English
 * @Date:2018.09.10
 * @Author:
 * @Brief:
 * @Detail:
 * @Editor:
 * @Brief:
 * \else
 *
 * @创建日期：2018年9月10日
 * @作者：hualei
 * @大概功能：MUSIC 指令
**************************/
#include "musicinstruction.h"

MusicInstruction::MusicInstruction()
{

}

QDataStream &operator <<(QDataStream &out, MusicInstruction &myVertor)
{
    out << (quint32)myVertor.instructionType << myVertor.musicFileName << myVertor.musicPlayTimes \
        << myVertor.musicVolume << myVertor.noteStr;

    return out;
}

QDataStream &operator >>(QDataStream &in, MusicInstruction &myVertor)
{
    quint32 instructionType;

    in >> instructionType >> myVertor.musicFileName >> myVertor.musicPlayTimes >> myVertor.musicVolume \
            >> myVertor.noteStr;

    myVertor.instructionType = (INSTRUCTION_TYPE)instructionType;

    return in;
}
